package center.leon.zoowebsentinel.holder;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author : Leon on XXM Mac
 * @since : create in 2024/8/20 17:19
 */
@Slf4j
@Data
@Component
@ConfigurationProperties(prefix = "sentinel")
public class SentinelHolder {

    private Web web;

    @Data
    public static class Web {
        private DataSource datasource;
    }

    @Data
    public static class DataSource {
        private Nacos nacos;
    }

    @Data
    public static class Nacos {
        private Flow flow;
    }

    @Data
    public static class Flow {
        private String serverAddr;
        private String namespace;
        private String dataId;
        private String groupId;
    }
}

